package com.svms.service.mapper;

import com.svms.model.SvmsTransport;
import com.svms.service.vo.AddressVO;
import com.svms.service.vo.TransportVO;

/**
 * @author om39a
 * 
 */
public final class TransportMapper {

	private TransportMapper() {

	}

	public static TransportVO dmlToService(SvmsTransport svmsTransport) {
		TransportVO transportVO = new TransportVO();
		transportVO.setTransportId(String.valueOf(svmsTransport
				.getTransportId()));
		transportVO.setCompanyName(String.valueOf(svmsTransport
				.getCompanyName()));
		AddressVO addressVO = new AddressVO();
		addressVO.setAddressLine1(svmsTransport.getAddressLine1());
		addressVO.setAddressLine2(svmsTransport.getAddressLine2());
		addressVO.setEmail(svmsTransport.getCompanyName());
		addressVO.setPhone(svmsTransport.getPhoneNo());
		transportVO.setTransportAddress(addressVO);
		return transportVO;
	}
}
